<!doctype html>
<html lang="zh-cn">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>sroll-snap-type优化滚动</title>
</head>
<style>
  * {
    padding: 0;
    margin: 0;
  }

  .list {
    list-style: none;
  }

  .list1 {
    display: flex;
    width: 100px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }
  .list1 li {
    width: 100px;
    text-align: center;
    height: 100px;
    line-height: 100px;
    background-color: #04e6fb;
    color: #000;
    flex-shrink: 0;
    scroll-snap-align: start;
  }

</style>
<body>
<ul class="list list1">
  <li>1</li>
  <li>2</li>
  <li>3</li>
</ul>
</body>
</html>
